function customGrid() {
    return {
		grid_id : '',
		form_id : '',
		data_url : '',
		toolbar : '',
		queryParams : {},
		columns : [],
		loadMsg : '数据加载中,请稍候...',
		fitColumns : false,
		width : 'auto',
		height : '100%',
		pagination : true,
		pageSize : 10,
		pageList : [ 5, 10, 20, 30, 50 ],
		singleSelect : true,
		fit : false,
		nowrap : true,
		rownumbers : true,
		checkOnSelect : false,
		selectOnCheck : false,
		striped : true,
		totalProperty : "total",
		rowsProperty : "rows",

		init : function(p_grid_id, p_form_id, p_data_url, p_columns) {
			this.grid_id = p_grid_id;
			this.form_id = p_form_id;
			this.data_url = p_data_url;
			this.columns = p_columns;
			this.initDataGrid();
			this.initPagination();
			this.load();
		},

		initDataGrid : function() {

			$('#' + this.grid_id).datagrid({
				toolbar : '#' + this.toolbar,
				loadMsg : this.loadMsg,
				width : this.width,
				height : '100%',
				fitColumns : this.fitColumns,
				striped : this.striped,
				nowrap : this.nowrap,
				rownumbers : this.rownumbers,
				pagination : this.pagination,
				pagePosition : 'bottom',
				pageSize : this.pageSize,
				pageList : this.pageList,
				singleSelect : this.singleSelect,
				fit : this.fit,
				queryParams : this.queryParams,
				checkOnSelect : this.checkOnSelect,
				selectOnCheck : this.selectOnCheck,
				totalProperty : this.totalProperty,
				rowsProperty : this.rowsProperty,
				columns : [ this.columns ]
			});

		},

		initPagination : function() {
			var pager = $('#' + this.grid_id).datagrid('getPager');
			var obj = this;
			pager.pagination({
				pageSize : obj.pageSize,
				pageNumber : 1,
				onSelectPage : function(page, rows) {
					obj.load();
				}
			});
		},

		load : function() {
			$('#' + this.grid_id).datagrid('options').url = this.data_url;
			$.extend(this.queryParams, $('#' + this.form_id).serializeArray());
			$('#' + this.grid_id).datagrid('reload');
		},

		getSelections : function() {
			return $('#' + this.grid_id).datagrid('getSelections');
		},

		getSelected : function() {
			return $('#' + this.grid_id).datagrid('getSelected');
		},

		selectRow : function(index) {
			return $('#' + this.grid_id).datagrid("selectRow", index);
		},

		unselectRow : function(index) {
			$('#' + this.grid_id).datagrid("unselectRow", index);
		},

		selectAll : function() {
			return $('#' + this.grid_id).datagrid("selectAll");
		},

		clearSelections : function() {
			$('#' + this.grid_id).datagrid("clearSelections");
		},

		getGrid : function() {
			return $('#' + this.grid_id);
		}
	};
}
